@import "../base/colors";
@import "../base/spacing";
@import "../components/dropdown";
@import "../components/context-menu";
@import "./components/toast";

.builtin-wrapper.settings-wrapper {

  ul {
    margin-bottom: 1em;
  }

  .builtin-main .view {
    padding: 0;
    border: 1px solid #e6e6e6;
  }

  .builtin-sidebar {
    left: 35px; // TODO why is *this* sidebar the only one that's janky?
  }

  .subtitle-heading {
    margin-bottom: 10px;
  }

  h3 {
    margin-bottom: 5px;
    font-size: inherit;
    font-weight: 500;
  }

  .section {
    padding: 20px 0;
    margin: 0 20px;
    border-top: 1px solid #eee;

    &.default-browser {

      .toggle {
        justify-content: flex-end;
        width: 100px;

        .text {
          width: 45px;
        }
      }
    }

    &.default-to-dat {
      .toggle {
        justify-content: flex-end;

        .text {
          margin-right: 10px;
        }
      }
    }

    &.analytics {
      .toggle {
        justify-content: flex-end;
        .text {
          width: 110px;
        }
      }
    }
  }

  .view > .section {
    &:first-of-type {
      border-top: 0;
      padding-top: 15px;
    }

    &:last-of-type {
      padding-bottom: 15px;
    }
  }

  .section-group {
    display: flex;

    .section {
      flex: 1;

      &:first-of-type {
        margin-right: 0;
        border-right: 1px solid #eee;
      }
      &:last-of-type {
        margin-left: 0;
        padding-left: 20px;
      }
    }
  }

  .auto-updater {

    .spinner {
      display: inline-block;
    }

    input {
      height: auto;
    }

    .btn {
      margin-right: 5px;
    }

    .up-to-date {
      color: shade(@green, 17%);
    }
  }


  &.protocols a {
    margin-left: 5px;
  }

  .on-startup {

    .radio-group {
      display: grid;
      grid-template-columns: auto auto;
      align-items: center;
      justify-content: start;
      grid-gap: 0 10px;
      margin-left: 0;

      input[type="radio"] {
        margin: 0;
      }
    }

    label {
      font-weight: 400;
      margin-bottom: 0;
    }
  }

  .dat-bandwidth {
    .inputs {
      &:extend(.flex);
      & > div {
        margin-right: 5px;
      }
      label {
        display: block;
      }
    }
  }

  .default-dat-ignore {
    textarea {
      width: 500px;
      height: 140px;
      padding: 4px 7px;
    }
  }

  &.help {

    a {
      text-decoration: none;
    }
  }
}

ul.settings-section {
  margin-left: @padding-component--tight;
}
